package com.mall.user.dto.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author xrj
 * @since 2022-04-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TbMember extends Model<TbMember> {

    private static final long serialVersionUID = -8949455580421727180L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名
     */
    @TableField("username")
    private String username;

    /**
     * 密码，加密存储
     */
    @TableField("password")
    private String password;

    /**
     * 注册手机号
     */
    @TableField("phone")
    private String phone;

    /**
     * 注册邮箱
     */
    @TableField("email")
    private String email;

    @TableField("created")
    private LocalDateTime created;

    @TableField("updated")
    private LocalDateTime updated;

    @TableField("sex")
    private String sex;

    @TableField("address")
    private String address;

    @TableField("state")
    private Integer state;

    /**
     * 头像
     */
    @TableField("file")
    private String file;

    @TableField("description")
    private String description;

    /**
     * 积分
     */
    @TableField("points")
    private Integer points;

    /**
     * 余额
     */
    @TableField("balance")
    private BigDecimal balance;

    @TableField("isverified")
    private String isverified;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
